Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mysql: sized blob data type moved to MySqlType & upstream StringLen #743

Merged
merged 11 commits into from
Jan 30, 2024

Conversation

billy1624
Copy link
Member

@billy1624 billy1624 commented Jan 30, 2024

PR Info

Breaking Changes

  • MySQL blob types moved to sea_query::extension::mysql::MySqlType
assert_eq!(
    Table::create()
        .table(BinaryType::Table)
        .col(ColumnDef::new(BinaryType::BinaryLen).binary(32))
        .col(ColumnDef::new(BinaryType::Binary).custom(MySqlType::Blob))
        .col(ColumnDef::new(BinaryType::TinyBlob).custom(MySqlType::TinyBlob))
        .col(ColumnDef::new(BinaryType::MediumBlob).custom(MySqlType::MediumBlob))
        .col(ColumnDef::new(BinaryType::LongBlob).custom(MySqlType::LongBlob))
        .to_string(MysqlQueryBuilder),
    [
        "CREATE TABLE `binary_type` (",
        "`binlen` binary(32),",
        "`bin` blob,",
        "`tb` tinyblob,",
        "`mb` mediumblob,",
        "`lb` longblob",
        ")",
    ]
    .join(" ")
);

@billy1624 billy1624 self-assigned this Jan 30, 2024
@tyt2y3 tyt2y3 merged commit 0dda132 into master Jan 30, 2024
20 checks passed
@tyt2y3 tyt2y3 deleted the data-type-blob branch January 30, 2024 09:53
@BugenZhao
Copy link

Hi, following this PR, it appears there's no longer a backend-agnostic method to specify a large blob type for a column. May I know if there are any practices I'm missing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants